<?php
// +----------------------------------------------------------------------
// | Author: wyd 2025/10/18
// | DESC: 
// +----------------------------------------------------------------------

declare (strict_types=1);

class ParentClass {}
class ChildClass extends ParentClass {}
$child = new ChildClass();

var_dump(is_subclass_of($child, 'ParentClass'));  // true
var_dump($child instanceof ParentClass);          // true
var_dump(is_a($child, 'ParentClass'));            // true
var_dump(is_subclass_of('ChildClass', 'ChildClass')); // false
var_dump(is_subclass_of('ChildClass', 'ParentClass')); // false